import Vue from 'vue'
import App from './App.vue'
import router from './router'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUI);
Vue.config.productionTip = false

import axios from 'axios'
axios.interceptors.request.use(
  config => {
    let token = localStorage.getItem("authorization")
    if (token) {
      config.headers.authorization = token
    }
    return config
  }
)
Vue.prototype.$axios = axios

new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
